package com.sikaryofficial.backend.domain.mapping;

import com.sikaryofficial.backend.domain.dto.req.information.FollowSaveReq;
import com.sikaryofficial.backend.domain.dto.resp.information.FollowDTO;
import com.sikaryofficial.backend.domain.entity.Follow;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 文章banner映射接口
 * @date : 2023/11/03 9:19
 */
@Mapper
public interface FollowMapping {
    FollowMapping INSTANCE = Mappers.getMapper(FollowMapping.class);

    /**
     * 实体映射resp
     *
     * @param follow
     * @return
     */
    FollowDTO coverToDTO(Follow follow);

    /**
     * req 转 实体
     *
     * @param req
     * @return
     */
    Follow coverReqToEntity(FollowSaveReq req);

    /**
     * 实体映射resp
     *
     * @param follows
     * @return
     */
    List<FollowDTO> coverToDTOList(List<Follow> follows);
}
